#include "qlib/geo/trapezoid.h"

namespace qlib {

Trapezoid::Trapezoid() {}

Trapezoid::~Trapezoid() {}

Trapezoid::s_ptr Trapezoid::copy() const {
  return create(*this);
};

void Trapezoid::init(const Vec2d& _position, double _width, double _height, uint32_t _layer, uint32_t _datatype) {
  position = _position;
  width = _width;
  height = _height;
  layer = _layer;
  datatype = _datatype;
}
void Trapezoid::init(const Vec2d& _left_bottom, const Vec2d& _right_top, uint32_t _layer, uint32_t _datatype) {
  position = _left_bottom;
  width = _right_top.x - _left_bottom.x;
  height = _right_top.y - _left_bottom.y;
  layer = _layer;
  datatype = _datatype;
}

}  // namespace qlib